package com.itbaizhan.clouddemoorder.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itbaizhan.clouddemoorder.domain.Order;
import com.itbaizhan.clouddemoorder.dto.OrderDto;
import com.itbaizhan.clouddemoorder.service.OrderService;
import com.itbaizhan.clouddemoorder.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【tb_order】的数据库操作Service实现
* @createDate 2024-04-25 15:24:02
*/
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order>
    implements OrderService{

    @Autowired
    private OrderMapper orderMapper;

    /**
     * 查询订单
     * @param orderDto
     * @return
     */

    @Override
    public Page<Order> selectOrder(OrderDto orderDto) {
        Page<Order> page = new Page<>(orderDto.getPageNum(), orderDto.getPageSize());
        Page<Order> orderPage = orderMapper.selectPage(page, null);
        return orderPage;
    }


}




